package com.letfox.finance.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.letfox.finance.dao.IncomeDetailDao;
import com.letfox.finance.model.FINIncomeDetail;
import com.letfox.finance.service.IncomeDetailService;

@Service
public class IncomeDetailServiceImpl implements IncomeDetailService {
	@Autowired
	private IncomeDetailDao incomeDetailDao;

	
	@Override
	public int deleteById(String finIncomeId) {
		
		return incomeDetailDao.deleteByPrimaryKey(finIncomeId);
	}
	@Override
	public int save(FINIncomeDetail finIncomeDetail) {
		
		return incomeDetailDao.insertSelective(finIncomeDetail);
	}
	@Override
	public FINIncomeDetail selectById(String finIncomeId) {
		
		return incomeDetailDao.selectByPrimaryKey(finIncomeId);
	}
	@Override
	public int update(FINIncomeDetail finIncomeDetail) {
		
		return incomeDetailDao.updateByPrimaryKeySelective(finIncomeDetail);
	}
}
